// 在没有两个数相同的情况下，逆序对数组与排序的顺序是相等的
#include <bits/stdc++.h>
using namespace std;
#define lowbit(x) (x & -x)
const int N = 2e5;
int c[N], a[N], n, m, i, j, ans[N];
int query(int x) {
  int sum = 0;
  for (int i = x; i > 0; i -= lowbit(i)) sum += c[i];
  return sum;
}
void add(int x, int k) {
  for (int i = x; i <= n; i += lowbit(i)) c[i] += k;
}

int main() {
  cin >> n;
  add(1, 1);
  for (int i = 2; i <= n; ++i) {
    cin >> a[i];
    add(i, 1);
  }
  // 至此构造了一个全1数组

  for (int i = n; i >= 1; --i) {
    int l = 1, r = n;
    while (l < r) {
      int mid = l + r >> 1;
      if (query(mid) < a[i] + 1)
        l = mid + 1;
      else
        r = mid;
    }
    ans[i] = r;
    add(r, -1);
  }
  for (int i = 1; i <= n; ++i) cout << ans[i] << endl;
}
